nanopyx.liquid._le_interpolation_lanczos
Shift and Magnify using the NanoPyx Liquid Engine
Initialize the Liquid Engine The Liquid Engine base class is inherited by children classes that implement specific methods
Engine responsabilities:
- Store implemented run types;
- Handle previous benchmarks and I/O;
- When queried, benchmark all available run types;
- Run a specific method using a selected run type;
Benchmark files have the following format:
The benchmark file is read as dict of dicts.
BENCHMARK DICT FOR A SPECIFIC METHOD
|- RUN_TYPE #1
| |- ARGS_REPR #1
| | |- [score, t2run#1, t2run#2, t2run#3, ...] last are newer. nan means fail
| |- ARGS_REPR #2
| | |- [score, t2run#1, t2run#2, t2run#3, ...] last are newer. nan means fail
| (...)
|- RUN_TYPE #2
(...)
Benchmark the ShiftAndMagnify run function in multiple run types
Parameters
- image: The image to shift and magnify
- shift_row: The number of rows to shift the image
- shift_col: The number of columns to shift the image
- magnification_row: The magnification factor for the rows
- magnification_col: The magnification factor for the columns
Returns
The benchmark results
Shift and magnify an image using Lanczos interpolation
Parameters
- image: The image to shift and magnify
- shift_row: The number of rows to shift the image
- shift_col: The number of columns to shift the image
- magnification_row: The magnification factor for the rows
- magnification_col: The magnification factor for the columns
Returns
The shifted and magnified image
Shift, Scale and Rotate (affine transform) using the NanoPyx Liquid Engine
Initialize the Liquid Engine The Liquid Engine base class is inherited by children classes that implement specific methods
Engine responsabilities:
- Store implemented run types;
- Handle previous benchmarks and I/O;
- When queried, benchmark all available run types;
- Run a specific method using a selected run type;
Benchmark files have the following format:
The benchmark file is read as dict of dicts.
BENCHMARK DICT FOR A SPECIFIC METHOD
|- RUN_TYPE #1
| |- ARGS_REPR #1
| | |- [score, t2run#1, t2run#2, t2run#3, ...] last are newer. nan means fail
| |- ARGS_REPR #2
| | |- [score, t2run#1, t2run#2, t2run#3, ...] last are newer. nan means fail
| (...)
|- RUN_TYPE #2
(...)
Benchmark the ShiftMagnifyScale run function in multiple run types
Parameters
- image: The image to shift, scale and rotate
- shift_row: The number of rows to shift the image
- shift_col: The number of columns to shift the image
- scale_row: The scale factor for the rows
- scale_col: The scale factor for the columns
- angle: Angle of rotation in radians. Positive is counter clockwise
Returns
The benchmark results
Shift and scale an image using Lanczos interpolation
Parameters
- image: The image to shift and magnify
- shift_row: The number of rows to shift the image
- shift_col: The number of columns to shift the image
- scale_row: The scale factor for the rows
- scale_col: The scale factor for the columns
- angle: Angle of rotation in radians. Positive is counter clockwise
Returns
The shifted, magnified and rotated image